package com.im.imservice.message;


import com.alibaba.fastjson.JSON;
import com.im.imservice.dto.Response;

public class MessageService {

    public static Response sendMessage(Integer code, String msg) {
        Response res = new Response(code,msg);
        return res;
    }

    public static String ok() {
        Response res = new Response(0,null);
        return JSON.toJSONString(res);
    }

    public static String ok(String msg) {
        Response res = new Response(0,msg);
        return JSON.toJSONString(res);
    }

    public static String err() {
        Response res = new Response(-1,null);
        return JSON.toJSONString(res);
    }
}
